Integrand size = 21, antiderivative size = 291 \[ \int (d+e x)^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\frac {(d+e x)^3}{6 e}+\frac {(2 c d-b e)^2 \sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{5/2}}-\frac {e^2 \sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}-\frac {e^2 \sqrt {\pi } \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{3/2}}-\frac {(2 c d-b e)^2 \sqrt {\pi } \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{5/2}}+\frac {e (2 c d-b e) \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {e (d+e x) \sin \left (2 a+2 b x+2 c x^2\right )}{8 c} \]
[Out]
Time = 0.37 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3549, 3545, 3543, 3529, 3433, 3432, 3528} \[ \int (d+e x)^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\frac {\sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) (2 c d-b e)^2 \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{5/2}}-\frac {\sqrt {\pi } \sin \left (2 a-\frac {b^2}{2 c}\right ) (2 c d-b e)^2 \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{5/2}}-\frac {\sqrt {\pi } e^2 \sin \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}-\frac {\sqrt {\pi } e^2 \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}+\frac {e (2 c d-b e) \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {e (d+e x) \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {(d+e x)^3}{6 e} \]
[In]
[Out]
Rule 3432
Rule 3433
Rule 3528
Rule 3529
Rule 3543
Rule 3545
Rule 3549
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{2} (d+e x)^2+\frac {1}{2} (d+e x)^2 \cos \left (2 a+2 b x+2 c x^2\right )\right ) \, dx \\ & = \frac {(d+e x)^3}{6 e}+\frac {1}{2} \int (d+e x)^2 \cos \left (2 a+2 b x+2 c x^2\right ) \, dx \\ & = \frac {(d+e x)^3}{6 e}+\frac {e (d+e x) \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}-\frac {e^2 \int \sin \left (2 a+2 b x+2 c x^2\right ) \, dx}{8 c}+\frac {(2 c d-b e) \int (d+e x) \cos \left (2 a+2 b x+2 c x^2\right ) \, dx}{4 c} \\ & = \frac {(d+e x)^3}{6 e}+\frac {e (2 c d-b e) \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {e (d+e x) \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {(2 c d-b e)^2 \int \cos \left (2 a+2 b x+2 c x^2\right ) \, dx}{8 c^2}-\frac {\left (e^2 \cos \left (2 a-\frac {b^2}{2 c}\right )\right ) \int \sin \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{8 c}-\frac {\left (e^2 \sin \left (2 a-\frac {b^2}{2 c}\right )\right ) \int \cos \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{8 c} \\ & = \frac {(d+e x)^3}{6 e}-\frac {e^2 \sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}-\frac {e^2 \sqrt {\pi } \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{3/2}}+\frac {e (2 c d-b e) \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {e (d+e x) \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {\left ((2 c d-b e)^2 \cos \left (2 a-\frac {b^2}{2 c}\right )\right ) \int \cos \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{8 c^2}-\frac {\left ((2 c d-b e)^2 \sin \left (2 a-\frac {b^2}{2 c}\right )\right ) \int \sin \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{8 c^2} \\ & = \frac {(d+e x)^3}{6 e}+\frac {(2 c d-b e)^2 \sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{5/2}}-\frac {e^2 \sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}-\frac {e^2 \sqrt {\pi } \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{3/2}}-\frac {(2 c d-b e)^2 \sqrt {\pi } \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{5/2}}+\frac {e (2 c d-b e) \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {e (d+e x) \sin \left (2 a+2 b x+2 c x^2\right )}{8 c} \\ \end{align*}
Time = 0.70 (sec) , antiderivative size = 215, normalized size of antiderivative = 0.74 \[ \int (d+e x)^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\frac {3 \sqrt {\pi } \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \left ((-2 c d+b e)^2 \cos \left (2 a-\frac {b^2}{2 c}\right )-c e^2 \sin \left (2 a-\frac {b^2}{2 c}\right )\right )-3 \sqrt {\pi } \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \left (c e^2 \cos \left (2 a-\frac {b^2}{2 c}\right )+(-2 c d+b e)^2 \sin \left (2 a-\frac {b^2}{2 c}\right )\right )+\sqrt {c} \left (8 c^2 x \left (3 d^2+3 d e x+e^2 x^2\right )+3 e (4 c d-b e+2 c e x) \sin (2 (a+x (b+c x)))\right )}{48 c^{5/2}} \]
[In]
[Out]
Time = 1.39 (sec) , antiderivative size = 378, normalized size of antiderivative = 1.30
method | result | size |
default | \(\frac {e^{2} x \sin \left (2 c \,x^{2}+2 b x +2 a \right )}{8 c}-\frac {e^{2} b \left (\frac {\sin \left (2 c \,x^{2}+2 b x +2 a \right )}{4 c}-\frac {b \sqrt {\pi }\, \left (\cos \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {C}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )+\sin \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {S}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )\right )}{4 c^{\frac {3}{2}}}\right )}{4 c}-\frac {e^{2} \sqrt {\pi }\, \left (\cos \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {S}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )-\sin \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {C}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )\right )}{16 c^{\frac {3}{2}}}+\frac {d e \sin \left (2 c \,x^{2}+2 b x +2 a \right )}{4 c}-\frac {d e b \sqrt {\pi }\, \left (\cos \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {C}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )+\sin \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {S}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )\right )}{4 c^{\frac {3}{2}}}+\frac {\sqrt {\pi }\, d^{2} \left (\cos \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {C}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )+\sin \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {S}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )\right )}{4 \sqrt {c}}+\frac {d e \,x^{2}}{2}+\frac {d^{2} x}{2}+\frac {e^{2} x^{3}}{6}\) | \(378\) |
risch | \(\frac {d e \,x^{2}}{2}+\frac {d^{2} x}{2}+\frac {e^{2} x^{3}}{6}+\frac {\operatorname {erf}\left (\sqrt {2}\, \sqrt {i c}\, x +\frac {i b \sqrt {2}}{2 \sqrt {i c}}\right ) \sqrt {2}\, \sqrt {\pi }\, d^{2} {\mathrm e}^{-\frac {i \left (4 a c -b^{2}\right )}{2 c}}}{16 \sqrt {i c}}+\frac {e^{2} \operatorname {erf}\left (\sqrt {2}\, \sqrt {i c}\, x +\frac {i b \sqrt {2}}{2 \sqrt {i c}}\right ) \sqrt {2}\, \sqrt {\pi }\, b^{2} {\mathrm e}^{-\frac {i \left (4 a c -b^{2}\right )}{2 c}}}{64 \sqrt {i c}\, c^{2}}-\frac {i e^{2} \operatorname {erf}\left (\sqrt {2}\, \sqrt {i c}\, x +\frac {i b \sqrt {2}}{2 \sqrt {i c}}\right ) \sqrt {2}\, \sqrt {\pi }\, {\mathrm e}^{-\frac {i \left (4 a c -b^{2}\right )}{2 c}}}{64 \sqrt {i c}\, c}-\frac {d e \,\operatorname {erf}\left (\sqrt {2}\, \sqrt {i c}\, x +\frac {i b \sqrt {2}}{2 \sqrt {i c}}\right ) \sqrt {2}\, \sqrt {\pi }\, b \,{\mathrm e}^{-\frac {i \left (4 a c -b^{2}\right )}{2 c}}}{16 \sqrt {i c}\, c}-\frac {\operatorname {erf}\left (-\sqrt {-2 i c}\, x +\frac {i b}{\sqrt {-2 i c}}\right ) \sqrt {\pi }\, d^{2} {\mathrm e}^{\frac {i \left (4 a c -b^{2}\right )}{2 c}}}{8 \sqrt {-2 i c}}-\frac {e^{2} \operatorname {erf}\left (-\sqrt {-2 i c}\, x +\frac {i b}{\sqrt {-2 i c}}\right ) \sqrt {\pi }\, b^{2} {\mathrm e}^{\frac {i \left (4 a c -b^{2}\right )}{2 c}}}{32 \sqrt {-2 i c}\, c^{2}}-\frac {i e^{2} \operatorname {erf}\left (-\sqrt {-2 i c}\, x +\frac {i b}{\sqrt {-2 i c}}\right ) \sqrt {\pi }\, {\mathrm e}^{\frac {i \left (4 a c -b^{2}\right )}{2 c}}}{32 \sqrt {-2 i c}\, c}+\frac {d e \,\operatorname {erf}\left (-\sqrt {-2 i c}\, x +\frac {i b}{\sqrt {-2 i c}}\right ) \sqrt {\pi }\, b \,{\mathrm e}^{\frac {i \left (4 a c -b^{2}\right )}{2 c}}}{8 \sqrt {-2 i c}\, c}+2 i \left (\frac {e^{2} \left (-\frac {i x}{4 c}+\frac {i b}{8 c^{2}}\right )}{4}-\frac {i d e}{8 c}\right ) \sin \left (2 c \,x^{2}+2 b x +2 a \right )\) | \(544\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 257, normalized size of antiderivative = 0.88 \[ \int (d+e x)^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\frac {8 \, c^{3} e^{2} x^{3} + 24 \, c^{3} d e x^{2} + 24 \, c^{3} d^{2} x + 6 \, {\left (2 \, c^{2} e^{2} x + 4 \, c^{2} d e - b c e^{2}\right )} \cos \left (c x^{2} + b x + a\right ) \sin \left (c x^{2} + b x + a\right ) - 3 \, {\left (\pi c e^{2} \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) - \pi {\left (4 \, c^{2} d^{2} - 4 \, b c d e + b^{2} e^{2}\right )} \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right )\right )} \sqrt {\frac {c}{\pi }} \operatorname {C}\left (\frac {{\left (2 \, c x + b\right )} \sqrt {\frac {c}{\pi }}}{c}\right ) - 3 \, {\left (\pi c e^{2} \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) + \pi {\left (4 \, c^{2} d^{2} - 4 \, b c d e + b^{2} e^{2}\right )} \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right )\right )} \sqrt {\frac {c}{\pi }} \operatorname {S}\left (\frac {{\left (2 \, c x + b\right )} \sqrt {\frac {c}{\pi }}}{c}\right )}{48 \, c^{3}} \]
[In]
[Out]
\[ \int (d+e x)^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\int \left (d + e x\right )^{2} \cos ^{2}{\left (a + b x + c x^{2} \right )}\, dx \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 1.38 (sec) , antiderivative size = 2360, normalized size of antiderivative = 8.11 \[ \int (d+e x)^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\text {Too large to display} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.37 (sec) , antiderivative size = 292, normalized size of antiderivative = 1.00 \[ \int (d+e x)^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\frac {1}{6} \, e^{2} x^{3} + \frac {1}{2} \, d e x^{2} + \frac {1}{2} \, d^{2} x - \frac {i \, {\left (c e^{2} {\left (2 \, x + \frac {b}{c}\right )} + 4 \, c d e - 2 \, b e^{2}\right )} e^{\left (2 i \, c x^{2} + 2 i \, b x + 2 i \, a\right )} + \frac {\sqrt {\pi } {\left (-4 i \, c^{2} d^{2} + 4 i \, b c d e - i \, b^{2} e^{2} + c e^{2}\right )} \operatorname {erf}\left (-\frac {1}{2} i \, \sqrt {c} {\left (2 \, x + \frac {b}{c}\right )} {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )}\right ) e^{\left (-\frac {i \, b^{2} - 4 i \, a c}{2 \, c}\right )}}{\sqrt {c} {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )}}}{32 \, c^{2}} - \frac {-i \, {\left (c e^{2} {\left (2 \, x + \frac {b}{c}\right )} + 4 \, c d e - 2 \, b e^{2}\right )} e^{\left (-2 i \, c x^{2} - 2 i \, b x - 2 i \, a\right )} + \frac {\sqrt {\pi } {\left (4 i \, c^{2} d^{2} - 4 i \, b c d e + i \, b^{2} e^{2} + c e^{2}\right )} \operatorname {erf}\left (\frac {1}{2} i \, \sqrt {c} {\left (2 \, x + \frac {b}{c}\right )} {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )}\right ) e^{\left (-\frac {-i \, b^{2} + 4 i \, a c}{2 \, c}\right )}}{\sqrt {c} {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )}}}{32 \, c^{2}} \]
[In]
[Out]
Timed out. \[ \int (d+e x)^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\int {\cos \left (c\,x^2+b\,x+a\right )}^2\,{\left (d+e\,x\right )}^2 \,d x \]
[In]
[Out]